<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs">
<head>
<title>std::ranges::views::iota, std::ranges::iota_view</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../../../common/favicon.ico">
<link rel="stylesheet" href="../../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-css:7:15cea3ec788a65b5187d4018eed543bf */</style>

<script src="../../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"cpp/ranges/iota_view","wgTitle":"cpp/ranges/iota view","wgCurRevisionId":65268,"wgArticleId":12018,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"zh","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"zh","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgMonthNamesShort":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRelevantPageName":"cpp/ranges/iota_view","wgUserVariant":"zh","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"zh","language":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-MathJax":1,"gadget-ColiruCompiler":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-js:7:258d7cd6aa9aa67dee25e01fb6a9e505 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<style type="text/css">/*<![CDATA[*/
.source-cpp {line-height: normal;}
.source-cpp li, .source-cpp pre {
	line-height: normal; border: 0px none white;
}
/**
 * GeSHi Dynamically Generated Stylesheet
 * --------------------------------------
 * Dynamically generated stylesheet for cpp
 * CSS class: source-cpp, CSS id: 
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 * --------------------------------------
 */
.cpp.source-cpp .de1, .cpp.source-cpp .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.cpp.source-cpp  {font-family:monospace;}
.cpp.source-cpp .imp {font-weight: bold; color: red;}
.cpp.source-cpp li, .cpp.source-cpp .li1 {font-weight: normal; vertical-align:top;}
.cpp.source-cpp .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.cpp.source-cpp .li2 {font-weight: bold; vertical-align:top;}
.cpp.source-cpp .kw1 {color: #0000dd;}
.cpp.source-cpp .kw2 {color: #0000ff;}
.cpp.source-cpp .kw3 {color: #0000dd;}
.cpp.source-cpp .kw4 {color: #0000ff;}
.cpp.source-cpp .co1 {color: #909090;}
.cpp.source-cpp .co2 {color: #339900;}
.cpp.source-cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp.source-cpp .es0 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es1 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es2 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es3 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es4 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es5 {color: #008000; font-weight: bold;}
.cpp.source-cpp .br0 {color: #008000;}
.cpp.source-cpp .sy0 {color: #008000;}
.cpp.source-cpp .sy1 {color: #000080;}
.cpp.source-cpp .sy2 {color: #000040;}
.cpp.source-cpp .sy3 {color: #000040;}
.cpp.source-cpp .sy4 {color: #008080;}
.cpp.source-cpp .st0 {color: #008000;}
.cpp.source-cpp .nu0 {color: #000080;}
.cpp.source-cpp .nu6 {color: #000080;}
.cpp.source-cpp .nu8 {color: #000080;}
.cpp.source-cpp .nu12 {color: #000080;}
.cpp.source-cpp .nu16 {color:#000080;}
.cpp.source-cpp .nu17 {color:#000080;}
.cpp.source-cpp .nu18 {color:#000080;}
.cpp.source-cpp .nu19 {color:#000080;}
.cpp.source-cpp .ln-xtra, .cpp.source-cpp li.ln-xtra, .cpp.source-cpp div.ln-xtra {background-color: #ffc;}
.cpp.source-cpp span.xtra { display:block; }

/*]]>*/
</style><style type="text/css">/*<![CDATA[*/
.source-text {line-height: normal;}
.source-text li, .source-text pre {
	line-height: normal; border: 0px none white;
}
/**
 * GeSHi Dynamically Generated Stylesheet
 * --------------------------------------
 * Dynamically generated stylesheet for text
 * CSS class: source-text, CSS id: 
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 * --------------------------------------
 */
.text.source-text .de1, .text.source-text .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.text.source-text  {font-family:monospace;}
.text.source-text .imp {font-weight: bold; color: red;}
.text.source-text li, .text.source-text .li1 {font-weight: normal; vertical-align:top;}
.text.source-text .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.text.source-text .li2 {font-weight: bold; vertical-align:top;}
.text.source-text .ln-xtra, .text.source-text li.ln-xtra, .text.source-text div.ln-xtra {background-color: #ffc;}
.text.source-text span.xtra { display:block; }

/*]]>*/
</style><!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_ranges_iota_view skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
<div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading"><span style="font-size:0.7em; line-height:130%">std::ranges::</span><span style="font-size:0.7em; line-height:130%">views::</span>iota, <span style="font-size:0.7em; line-height:130%">std::ranges::</span>iota_view</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">来自cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../../cpp.html" title="cpp">cpp</a>‎ | <a href="../ranges.html" title="cpp/ranges">ranges</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr"><div class="t-navbar" style=""><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../../cpp.html" title="cpp"> C++</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em;">
<tr class="t-nv"><td colspan="5"> <a href="../language.html" title="cpp/language">语言</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../header.html" title="cpp/header">标准库头文件</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../freestanding.html" title="cpp/freestanding"> 自立与有宿主实现</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../named_req.html" title="cpp/named req">具名要求</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../utility.html#.E8.AF.AD.E8.A8.80.E6.94.AF.E6.8C.81" title="cpp/utility">语言支持库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../concepts.html" title="cpp/concepts">概念库</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../error.html" title="cpp/error">诊断库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../utility.html" title="cpp/utility">工具库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../string.html" title="cpp/string">字符串库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="https://zh.cppreference.com/w/cpp/container" title="cpp/container">容器库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../iterator.html" title="cpp/iterator">迭代器库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../ranges.html" title="cpp/ranges"> 范围库</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../algorithm.html" title="cpp/algorithm">算法库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../numeric.html" title="cpp/numeric">数值库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../io.html" title="cpp/io">输入/输出库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../locale.html" title="cpp/locale">本地化库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../regex.html" title="cpp/regex">正则表达式库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../atomic.html" title="cpp/atomic">原子操作库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../thread.html" title="cpp/thread">线程支持库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../filesystem.html" title="cpp/filesystem">文件系统库</a> <span class="t-mark-rev t-since-cxx17">(C++17)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../experimental.html" title="cpp/experimental">技术规范</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../ranges.html" title="cpp/ranges"> 范围库</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv-h2"><td colspan="5"> 范围访问</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/begin&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/begin（页面不存在）"><span class="t-lines"><span>begin</span><span>cbegin</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/end&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/end（页面不存在）"><span class="t-lines"><span>end</span><span>cend</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/rbegin&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/rbegin（页面不存在）"><span class="t-lines"><span>rbegin</span><span>crbegin</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/rend&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/rend（页面不存在）"><span class="t-lines"><span>rend</span><span>crend</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/size&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/size（页面不存在）"><span class="t-lines"><span>size</span><span>ssize</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/data&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/data（页面不存在）"><span class="t-lines"><span>data</span><span>cdata</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/empty&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/empty（页面不存在）"><span class="t-lines"><span>empty</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 范围原语</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="iterator_t.html" title="cpp/ranges/iterator t"><span class="t-lines"><span>iterator_t</span><span>sentinel_t</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="iterator_t.html" title="cpp/ranges/iterator t"><span class="t-lines"><span>range_size_t</span><span>range_difference_t</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="iterator_t.html" title="cpp/ranges/iterator t"><span class="t-lines"><span>range_value_t</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="iterator_t.html" title="cpp/ranges/iterator t"><span class="t-lines"><span>range_reference_t</span><span>range_rvalue_reference_t</span></span></a></div></div></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 悬垂迭代器处理</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="dangling.html" title="cpp/ranges/dangling"><span class="t-lines"><span>dangling</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="borrowed_iterator_t.html" title="cpp/ranges/borrowed iterator t"><span class="t-lines"><span>borrowed_iterator_t</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="borrowed_iterator_t.html" title="cpp/ranges/borrowed iterator t"><span class="t-lines"><span>borrowed_subrange_t</span></span></a></div></div></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 范围概念</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="range.html" title="cpp/ranges/range"><span class="t-lines"><span>range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="borrowed_range.html" title="cpp/ranges/borrowed range"><span class="t-lines"><span>borrowed_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="sized_range.html" title="cpp/ranges/sized range"><span class="t-lines"><span>sized_range</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="common_range.html" title="cpp/ranges/common range"><span class="t-lines"><span>common_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="view.html" title="cpp/ranges/view"><span class="t-lines"><span>view</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="viewable_range.html" title="cpp/ranges/viewable range"><span class="t-lines"><span>viewable_range</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="input_range.html" title="cpp/ranges/input range"><span class="t-lines"><span>input_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="output_range.html" title="cpp/ranges/output range"><span class="t-lines"><span>output_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="forward_range.html" title="cpp/ranges/forward range"><span class="t-lines"><span>forward_range</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="bidirectional_range.html" title="cpp/ranges/bidirectional range"><span class="t-lines"><span>bidirectional_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="random_access_range.html" title="cpp/ranges/random access range"><span class="t-lines"><span>random_access_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="contiguous_range.html" title="cpp/ranges/contiguous range"><span class="t-lines"><span>contiguous_range</span></span></a></div></div></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 视图</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/view_interface&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/view interface（页面不存在）"><span class="t-lines"><span>view_interface</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="subrange.html" title="cpp/ranges/subrange"><span class="t-lines"><span>subrange</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="semiregular_wrapper.html" title="cpp/ranges/semiregular wrapper">半正则包装</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 工厂</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="empty_view.html" title="cpp/ranges/empty view"><span class="t-lines"><span>empty_view</span><span>views::empty</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/single_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/single view（页面不存在）"><span class="t-lines"><span>single_view</span><span>views::single</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>iota_view</span><span>views::iota</span></span></strong></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="view_counted.html" title="cpp/ranges/view counted"><span class="t-lines"><span>views::counted</span></span></a></div></div></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 适配器</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="all_view.html" title="cpp/ranges/all view"><span class="t-lines"><span>views::all_t</span><span>views::all</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/join_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/join view（页面不存在）"><span class="t-lines"><span>join_view</span><span>views::join</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/take_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/take view（页面不存在）"><span class="t-lines"><span>take_view</span><span>views::take</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/basic_istream_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/basic istream view（页面不存在）"><span class="t-lines"><span>basic_istream_view</span><span>istream_view</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="ref_view.html" title="cpp/ranges/ref view"><span class="t-lines"><span>ref_view</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5">                              </td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/split_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/split view（页面不存在）"><span class="t-lines"><span>split_view</span><span>views::split</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/take_while_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/take while view（页面不存在）"><span class="t-lines"><span>take_while_view</span><span>views::take_while</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/elements_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/elements view（页面不存在）"><span class="t-lines"><span>elements_view</span><span>views::elements</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/common_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/common view（页面不存在）"><span class="t-lines"><span>common_view</span><span>views::common</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/transform_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/transform view（页面不存在）"><span class="t-lines"><span>transform_view</span><span>views::transform</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/drop_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/drop view（页面不存在）"><span class="t-lines"><span>drop_view</span><span>views::drop</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/keys_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/keys view（页面不存在）"><span class="t-lines"><span>keys_view</span><span>views::keys</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="reverse_view.html" title="cpp/ranges/reverse view"><span class="t-lines"><span>reverse_view</span><span>views::reverse</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="filter_view.html" title="cpp/ranges/filter view"><span class="t-lines"><span>filter_view</span><span>views::filter</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/drop_while_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/drop while view（页面不存在）"><span class="t-lines"><span>drop_while_view</span><span>views::drop_while</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/values_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/values view（页面不存在）"><span class="t-lines"><span>values_view</span><span>views::values</span></span></a></div></div></td></tr>
</table></div></td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div></div>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span>std<span class="sy4">::</span><span class="me2">weakly_incrementable</span> W,<br>
<p>         std<span class="sy4">::</span><span class="me2">semiregular</span> Bound <span class="sy1">=</span> std<span class="sy4">::</span><span class="me2">unreachable_sentinel_t</span><span class="sy1">&gt;</span><br>
    requires __WeaklyEqualityComparableWith<span class="sy1">&lt;</span>W, Bound<span class="sy1">&gt;</span> <span class="sy3">&amp;&amp;</span> std<span class="sy4">::</span><span class="me2">semiregular</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><br>
</p>
<span class="kw1">class</span> iota_view <span class="sy4">:</span> <span class="kw1">public</span> ranges<span class="sy4">::</span><span class="me2">view_interface</span><span class="sy1">&lt;</span>iota_view<span class="sy1">&lt;</span>W, Bound<span class="sy1">&gt;&gt;</span></span></div></td>
<td> (1) </td>
<td> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span> </td>
</tr>

<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">namespace</span> views <span class="br0">{</span><br>
<p>    <span class="kw1">inline</span> <span class="kw4">constexpr</span> <span class="coMULTI">/*unspecified*/</span> iota <span class="sy1">=</span> <span class="coMULTI">/*unspecified*/</span><span class="sy4">;</span><br>
</p>
<span class="br0">}</span></span></div></td>
<td> (2) </td>
<td> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span> </td>
</tr>

<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> 以重复自增初值生成序列的范围工厂。能为有界和无界（无限）。</div>
<div class="t-li1"><span class="t-li">2)</span> <span class="t-c"><span class="mw-geshi cpp source-cpp">views<span class="sy4">::</span><span class="me2">iota</span><span class="br0">(</span>E<span class="br0">)</span></span></span> 与 <span class="t-c"><span class="mw-geshi cpp source-cpp">views<span class="sy4">::</span><span class="me2">iota</span><span class="br0">(</span>E, F<span class="br0">)</span></span></span> 对于适合的 <code>E</code> 和 <code>F</code> 子表达式分别<i>表达式等价</i>于 <span class="t-c"><span class="mw-geshi cpp source-cpp">iota_view<span class="br0">{</span>E<span class="br0">}</span></span></span> 与 <span class="t-c"><span class="mw-geshi cpp source-cpp">iota_view<span class="br0">{</span>E, F<span class="br0">}</span></span></span> 。</div>
<h3><span class="mw-headline" id=".E8.A1.A8.E8.BE.BE.E5.BC.8F.E7.AD.89.E4.BB.B7">表达式等价</span></h3>
<p>表达式 <span class="t-c"><span class="mw-geshi cpp source-cpp">e</span></span> <i>表达式等价</i>于表达式 <span class="t-c"><span class="mw-geshi cpp source-cpp">f</span></span> ，若 <span class="t-c"><span class="mw-geshi cpp source-cpp">e</span></span> 与 <span class="t-c"><span class="mw-geshi cpp source-cpp">f</span></span> 拥有相同效果，均为<a href="../language/noexcept_spec.html" title="cpp/language/noexcept spec">潜在抛出</a>或均非潜在抛出（即 <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">noexcept</span><span class="br0">(</span>e<span class="br0">)</span> <span class="sy1">==</span> <span class="kw1">noexcept</span><span class="br0">(</span>f<span class="br0">)</span></span></span> ），且均为<a href="../language/constant_expression.html" title="cpp/language/constant expression">常量子表达式</a>或均非常量子表达式。
</p>
<h3><span class="mw-headline" id=".E8.BE.85.E5.8A.A9.E6.A8.A1.E6.9D.BF">辅助模板</span></h3>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span>std<span class="sy4">::</span><span class="me2">weakly_incrementable</span> W, std<span class="sy4">::</span><span class="me2">semiregular</span> Bound<span class="sy1">&gt;</span><br>
<span class="kw1">inline</span> <span class="kw4">constexpr</span> <span class="kw4">bool</span> enable_borrowed_range<span class="sy1">&lt;</span>ranges<span class="sy4">::</span><span class="me2">iota_view</span><span class="sy1">&lt;</span>W, Bound<span class="sy1">&gt;&gt;</span> <span class="sy1">=</span> <span class="kw2">true</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p><a href="borrowed_range.html" title="cpp/ranges/borrowed range"><tt>std::ranges::enable_borrowed_range</tt></a> 的此特化使得 <code>iota_view</code> 满足 <a href="borrowed_range.html" title="cpp/ranges/borrowed range"><tt>borrowed_range</tt></a> 。
</p>
<h3><span class="mw-headline" id=".E6.95.B0.E6.8D.AE.E6.88.90.E5.91.98">数据成员</span></h3>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::base"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::</span>base_ </span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp">W value_ <span class="sy1">=</span> W<span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span> <span class="coMULTI">/* exposition-only */</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>当前值
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::pred"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::</span>pred_ </span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp">Bound bound_ <span class="sy1">=</span> Bound<span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span> <span class="coMULTI">/* exposition-only */</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>边界（默认为 <span class="t-lc">std::unreachable_sentinel_t</span> ）
</p>
</div>
<h3><span class="mw-headline" id=".E6.88.90.E5.91.98.E5.87.BD.E6.95.B0">成员函数</span></h3>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iota_view"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::</span>iota_view </span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp">iota_view<span class="br0">(</span><span class="br0">)</span> <span class="sy1">=</span> <span class="kw1">default</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="kw1">explicit</span> iota_view<span class="br0">(</span>W value<span class="br0">)</span><span class="sy4">;</span></span></div></td>
<td> (2) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> iota_view<span class="br0">(</span>std<span class="sy4">::</span><span class="me2">type_identity_t</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span> value,<br>
                    std<span class="sy4">::</span><span class="me2">type_identity_t</span><span class="sy1">&lt;</span>Bound<span class="sy1">&gt;</span> bound<span class="br0">)</span><span class="sy4">;</span></span></div></td>
<td> (3) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> 值初始化 <code>value_</code> 与 <code>bound_</code> 。</div>
<div class="t-li1"><span class="t-li">2)</span> 以 <span class="t-c"><span class="mw-geshi cpp source-cpp">value</span></span> 初始化 <code>value_</code> ，并期待 <code>Bound</code> 为 <code>unreachable_sentinel_­t</code> （默认）或可从 <code>value</code> 达到的 <span class="t-c"><span class="mw-geshi cpp source-cpp">Bound<span class="br0">(</span><span class="br0">)</span></span></span> 值。此构造函数用于创建无界 iota 视图，例如 <span class="t-c"><span class="mw-geshi cpp source-cpp">iota<span class="br0">(</span><span class="nu0">0</span><span class="br0">)</span></span></span> 产生数 0 、 1 、 2 ……无穷大。</div>
<div class="t-li1"><span class="t-li">3)</span> 以 <span class="t-c"><span class="mw-geshi cpp source-cpp">value</span></span> 初始化 <code>value_</code> 并以 <code>bound</code> 初始化 <code>bound_</code> 。此构造函数用于创建有界 iota 视图，例如 <span class="t-c"><span class="mw-geshi cpp source-cpp">iota<span class="br0">(</span><span class="nu0">10</span>, <span class="nu0">20</span><span class="br0">)</span></span></span> 产生从 10 到 19 的数。</div>
<h3> <span class="mw-headline" id=".E5.8F.82.E6.95.B0">参数</span></h3>
<table class="t-par-begin">


<tr class="t-par">
<td>  value
</td>
<td> -
</td>
<td>  开始值
</td></tr>
<tr class="t-par">
<td>  bound
</td>
<td> -
</td>
<td>  边界
</td></tr></table>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::begin"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::</span>begin</span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> iterator begin<span class="br0">(</span><span class="br0">)</span> <span class="kw4">const</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>返回以 <span class="t-c"><span class="mw-geshi cpp source-cpp">value_</span></span> 初始化的迭代器。
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::end"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::</span>end</span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="kw4">auto</span> end<span class="br0">(</span><span class="br0">)</span> <span class="kw4">const</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> iterator end<span class="br0">(</span><span class="br0">)</span> <span class="kw4">const</span> requires std<span class="sy4">::</span><span class="me2">same_as</span><span class="sy1">&lt;</span>W, Bound<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (2) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> 若视图有界则返回以 <span class="t-c"><span class="mw-geshi cpp source-cpp">bound_</span></span> 初始化的哨位，或若视图无界则返回 <span class="t-lc">std::unreachable_sentinel</span> 。</div>
<div class="t-li1"><span class="t-li">2)</span> 返回以 <span class="t-c"><span class="mw-geshi cpp source-cpp">bound_</span></span> 初始化的迭代器。
</div></div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::size"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::</span>size</span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="kw4">auto</span> size<span class="br0">(</span><span class="br0">)</span> <span class="kw4">const</span><br>
<p>  requires <span class="br0">(</span>std<span class="sy4">::</span><span class="me2">same_as</span><span class="sy1">&lt;</span>W, Bound<span class="sy1">&gt;</span> <span class="sy3">&amp;&amp;</span> __Advanceable<span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="br0">)</span> <span class="sy3">||</span><br>
           <span class="br0">(</span>std<span class="sy4">::</span><span class="me2">integral</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span> <span class="sy3">&amp;&amp;</span> std<span class="sy4">::</span><span class="me2">integral</span><span class="sy1">&lt;</span>Bound<span class="sy1">&gt;</span><span class="br0">)</span> <span class="sy3">||</span><br>
             std<span class="sy4">::</span><span class="me2">sized_sentinel_for</span><span class="sy1">&lt;</span>Bound, W<span class="sy1">&gt;</span><br>
<span class="br0">{</span><br>
  <span class="kw1">if</span> <span class="kw4">constexpr</span> <span class="br0">(</span>__is_integer_like<span class="sy1">&lt;</span>W<span class="sy1">&gt;</span> <span class="sy3">&amp;&amp;</span> __is_integer_like<span class="sy1">&lt;</span>Bound<span class="sy1">&gt;</span><span class="br0">)</span><br>
    <span class="kw1">return</span> <span class="br0">(</span>value_ <span class="sy1">&lt;</span> <span class="nu0">0</span><span class="br0">)</span><br>
      <span class="sy4">?</span> <span class="br0">(</span><span class="br0">(</span>bound_ <span class="sy1">&lt;</span> <span class="nu0">0</span><span class="br0">)</span><br>
        <span class="sy4">?</span> __make_unsigned_like<span class="br0">(</span><span class="sy2">-</span>value_<span class="br0">)</span> <span class="sy2">-</span> __make_unsigned_like<span class="br0">(</span><span class="sy2">-</span>bound_<span class="br0">)</span><br>
        <span class="sy4">:</span> __make_unsigned_like<span class="br0">(</span>bound_<span class="br0">)</span> <span class="sy2">+</span> __make_unsigned_like<span class="br0">(</span><span class="sy2">-</span>value_<span class="br0">)</span><span class="br0">)</span><br>
      <span class="sy4">:</span> __make_unsigned_like<span class="br0">(</span>bound_<span class="br0">)</span> <span class="sy2">-</span> __make_unsigned_like<span class="br0">(</span>value_<span class="br0">)</span><span class="sy4">;</span><br>
  <span class="kw1">else</span><br>
    <span class="kw1">return</span> __make_unsigned_like<span class="br0">(</span>bound_ <span class="sy2">-</span> value_<span class="br0">)</span><span class="sy4">;</span><br>
</p>
<span class="br0">}</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>若视图有界则返回视图的大小。
</p>
</div>
<h3><span class="mw-headline" id=".E6.8E.A8.E5.AF.BC.E6.8C.87.E5.BC.95">推导指引</span></h3>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span><span class="kw1">class</span> W, <span class="kw1">class</span> Bound<span class="sy1">&gt;</span><br>
<p>    requires <span class="br0">(</span><span class="sy3">!</span>__is_integer_like<span class="sy1">&lt;</span>W<span class="sy1">&gt;</span> <span class="sy3">||</span> <span class="sy3">!</span>__is_integer_like<span class="sy1">&lt;</span>Bound<span class="sy1">&gt;</span> <span class="sy3">||</span><br>
              __is_signed_integer_like<span class="sy1">&lt;</span>W<span class="sy1">&gt;</span> <span class="sy1">==</span> __is_signed_integer_like<span class="sy1">&lt;</span>Bound<span class="sy1">&gt;</span><span class="br0">)</span><br>
</p>
  iota_view<span class="br0">(</span>W, Bound<span class="br0">)</span> <span class="sy2">-</span><span class="sy1">&gt;</span> iota_view<span class="sy1">&lt;</span>W, Bound<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>注意推导指引自身抵御有符号/无符号不匹配漏洞，如 <span class="t-c"><span class="mw-geshi cpp source-cpp">views<span class="sy4">::</span><span class="me2">iota</span><span class="br0">(</span><span class="nu0">0</span>, v.<span class="me1">size</span><span class="br0">(</span><span class="br0">)</span><span class="br0">)</span></span></span> ，其中 <code>0</code> 为（有符号） <code>int</code> 而 <code>v.size()</code> 为（无符号） <code>std::size_t</code> 。
</p>
<h3><span class="mw-headline" id=".E5.B5.8C.E5.A5.97.E7.B1.BB">嵌套类</span></h3>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::</span>iterator</span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span><span class="kw1">class</span> W, <span class="kw1">class</span> Bound<span class="sy1">&gt;</span><br>
<span class="kw1">struct</span> iota_view<span class="sy1">&lt;</span>W, Bound<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">iterator</span><span class="sy4">;</span> <span class="coMULTI">/* exposition-only */</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p><code>iota_view::begin</code> 的返回类型。
</p><p>它若 <span class="t-c"><span class="mw-geshi cpp source-cpp">W</span></span> 实现 <span class="t-spar">__Advanceable</span> 则此为 <a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/iterator/random_access_iterator&amp;action=edit&amp;redlink=1" class="new" title="cpp/iterator/random access iterator（页面不存在）"><tt>random_access_iterator</tt></a> ，若 <span class="t-c"><span class="mw-geshi cpp source-cpp">W</span></span> 实现 <span class="t-spar">__Decrementable</span> 则为 <a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/iterator/bidirectional_iterator&amp;action=edit&amp;redlink=1" class="new" title="cpp/iterator/bidirectional iterator（页面不存在）"><tt>bidirectional_iterator</tt></a> ，若 <span class="t-c"><span class="mw-geshi cpp source-cpp">W</span></span> 实现 <a href="../iterator/incrementable.html" title="cpp/iterator/incrementable"><tt>incrementable</tt></a> 则为 <a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/iterator/forward_iterator&amp;action=edit&amp;redlink=1" class="new" title="cpp/iterator/forward iterator（页面不存在）"><tt>forward_iterator</tt></a> ，否则为 <a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/iterator/input_iterator&amp;action=edit&amp;redlink=1" class="new" title="cpp/iterator/input iterator（页面不存在）"><tt>input_iterator</tt></a> 。然而它只是<a href="../named_req/InputIterator.html" title="cpp/named req/InputIterator"><i>遗留输入迭代器</i> <span style="font-family: Georgia, 'DejaVu Serif', serif; font-style:italic">(LegacyInputIterator)</span> </a>。
</p>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::iterator"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::iterator::</span>iterator</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="kw1">explicit</span> iterator<span class="br0">(</span>W value<span class="br0">)</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>以 <span class="t-c"><span class="mw-geshi cpp source-cpp">value</span></span> 初始化仅用于阐释的数据成员 <span class="t-c"><span class="mw-geshi cpp source-cpp">value_</span></span> 。此值将为 operator* 所返回并为 operator++ 所增加。
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator.2A"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::iterator::</span>operator*</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> W operator<span class="sy2">*</span><span class="br0">(</span><span class="br0">)</span> <span class="kw4">const</span> <span class="kw1">noexcept</span><span class="br0">(</span><a href="../types/is_copy_constructible.html"><span class="kw537">std::<span class="me2">is_nothrow_copy_constructible_v</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="br0">)</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>按值返回当前值（换言之，这是只读视图）。
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator.2B.2B"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::iterator::</span>operator++</span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> iterator<span class="sy3">&amp;</span> operator<span class="sy2">++</span><span class="br0">(</span><span class="br0">)</span></span></div></td>
<td> (1) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="kw4">void</span> operator<span class="sy2">++</span><span class="br0">(</span><span class="kw4">int</span><span class="br0">)</span></span></div></td>
<td> (2) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> iterator operator<span class="sy2">++</span><span class="br0">(</span><span class="kw4">int</span><span class="br0">)</span> requires std<span class="sy4">::</span><span class="me2">incrementable</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (3) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> 等价于 <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">++</span>value_<span class="sy4">;</span> <span class="kw1">return</span> <span class="sy2">*</span>this<span class="sy4">;</span></span></span> 。</div>
<div class="t-li1"><span class="t-li">2)</span> 等价于 <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">++</span>value_<span class="sy4">;</span></span></span> 。</div>
<div class="t-li1"><span class="t-li">3)</span> 等价于 <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw4">auto</span> tmp <span class="sy1">=</span> <span class="sy2">*</span>this<span class="sy4">;</span> <span class="sy2">++</span>value_<span class="sy4">;</span> <span class="kw1">return</span> tmp<span class="sy4">;</span></span></span> 。
</div></div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator--"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::iterator::</span>operator--</span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> iterator<span class="sy3">&amp;</span> operator<span class="sy2">--</span><span class="br0">(</span><span class="br0">)</span> requires __Decrementable<span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> iterator operator<span class="sy2">--</span><span class="br0">(</span><span class="kw4">int</span><span class="br0">)</span> requires __Decrementable<span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (2) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> 等价于 <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">--</span>value_<span class="sy4">;</span> <span class="kw1">return</span> <span class="sy2">*</span>this<span class="sy4">;</span></span></span> 。</div>
<div class="t-li1"><span class="t-li">2)</span> 等价于 <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw4">auto</span> tmp <span class="sy1">=</span> <span class="sy2">*</span>this<span class="sy4">;</span> <span class="sy2">--</span>value_<span class="sy4">;</span> <span class="kw1">return</span> tmp<span class="sy4">;</span></span></span> 。
</div></div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator.5B.5D"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::iterator::</span>operator[]</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> W operator<span class="br0">[</span><span class="br0">]</span><span class="br0">(</span>difference_type n<span class="br0">)</span> <span class="kw4">const</span> requires __Advanceable<span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> W<span class="br0">(</span>value_­ <span class="sy2">+</span> n<span class="br0">)</span><span class="sy4">;</span></span></span>
</p>
</div>
<p>其他期待迭代器具有的成员。
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::sentinel"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::</span>sentinel</span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span><span class="kw1">class</span> W, <span class="kw1">class</span> Bound<span class="sy1">&gt;</span><br>
<span class="kw1">struct</span> iota_view<span class="sy1">&lt;</span>W, Bound<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">sentinel</span><span class="sy4">;</span> <span class="coMULTI">/* exposition-only */</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p><code>iota_view::end</code> 的返回类型。
</p>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::sentinel::bound"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::sentinel::</span>bound_</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp">Bound bound_ <span class="sy1">=</span> Bound<span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span> <span class="coMULTI">/* exposition only */</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>仅用于阐释的数据成员保有哨位（通常对于有界 iota 视图为数，或对于无界 iota 视图为 <span class="t-lc">std::unreachable_sentinel_t</span> 的实例）。
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::sentinel::sentinel"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::sentinel::</span>sentinel</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp">sentinel<span class="br0">(</span><span class="br0">)</span> <span class="sy1">=</span> <span class="kw1">default</span><span class="sy4">;</span><br>
<span class="kw4">constexpr</span> <span class="kw1">explicit</span> sentinel<span class="br0">(</span>Bound bound<span class="br0">)</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>以 <span class="t-c"><span class="mw-geshi cpp source-cpp">bound</span></span> 初始化仅用于阐释的数据成员 <span class="t-c"><span class="mw-geshi cpp source-cpp">bound_</span></span> 。
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::sentinel::operator.3D.3D"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::sentinel::</span>operator==</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl">
<td class="t-dcl-nopad"> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="kw4">bool</span> operator<span class="sy1">==</span><span class="br0">(</span><span class="kw4">const</span> iterator<span class="sy3">&amp;</span> x, <span class="kw4">const</span> sentinel<span class="sy3">&amp;</span> y<span class="br0">)</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>等价于 <span class="t-c"><span class="mw-geshi cpp source-cpp">x.<span class="me1">value_</span>­ <span class="sy1">==</span> y.<span class="me1">bound_</span>­<span class="sy4">;</span></span></span> 。
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::sentinel::operator-"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::sentinel::</span>operator- </span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> std<span class="sy4">::</span><span class="me2">iter_difference_t</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><br>
<p>    operator<span class="sy2">-</span><span class="br0">(</span><span class="kw4">const</span> iterator<span class="sy3">&amp;</span> x, <span class="kw4">const</span> sentinel<span class="sy3">&amp;</span> y<span class="br0">)</span><br>
</p>
    requires std<span class="sy4">::</span><span class="me2">sized_sentinel_for</span><span class="sy1">&lt;</span>Bound, W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> std<span class="sy4">::</span><span class="me2">iter_difference_t</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><br>
<p>    operator<span class="sy2">-</span><span class="br0">(</span><span class="kw4">const</span> sentinel<span class="sy3">&amp;</span> x, <span class="kw4">const</span> iterator<span class="sy3">&amp;</span> y<span class="br0">)</span><br>
</p>
    requires std<span class="sy4">::</span><span class="me2">sized_sentinel_for</span><span class="sy1">&lt;</span>Bound, W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (2) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> 等价于 <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> x.<span class="me1">value_</span>­ <span class="sy2">-</span> y.<span class="me1">bound_</span>­<span class="sy4">;</span></span></span> 。</div>
<div class="t-li1"><span class="t-li">2)</span> 等价于 <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> <span class="sy2">-</span><span class="br0">(</span>y.<span class="me1">value_</span> <span class="sy2">-</span> x.<span class="me1">bound_</span><span class="br0">)</span><span class="sy4">;</span></span></span> 。
</div></div>
</div>
<h3><span class="mw-headline" id=".E7.A4.BA.E4.BE.8B">示例</span></h3>
<div class="t-example"><div class="t-example-live-link"><div class="coliru-btn coliru-btn-run-init">运行此代码</div></div>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="cpp source-cpp"><pre class="de1"><span class="co2">#include &lt;ranges&gt;</span>
<span class="co2">#include &lt;vector&gt;</span>
<span class="co2">#include &lt;iostream&gt;</span>
 
<span class="kw4">int</span> main<span class="br0">(</span><span class="br0">)</span>
<span class="br0">{</span>
    <span class="kw1">for</span> <span class="br0">(</span><span class="kw4">int</span> i <span class="sy4">:</span> std<span class="sy4">::</span><span class="me2">views</span><span class="sy4">::</span><span class="me2">iota</span><span class="br0">{</span><span class="nu0">1</span>, <span class="nu0">10</span><span class="br0">}</span><span class="br0">)</span>
        <a href="../io/cout.html"><span class="kw1758">std::<span class="me2">cout</span></span></a> <span class="sy1">&lt;&lt;</span> i <span class="sy1">&lt;&lt;</span> <span class="st0">' '</span><span class="sy4">;</span>
 
    <a href="../io/cout.html"><span class="kw1758">std::<span class="me2">cout</span></span></a> <span class="sy1">&lt;&lt;</span> <span class="st0">'<span class="es1">\n</span>'</span><span class="sy4">;</span>
 
    <span class="kw1">for</span> <span class="br0">(</span><span class="kw4">int</span> i <span class="sy4">:</span> std<span class="sy4">::</span><span class="me2">views</span><span class="sy4">::</span><span class="me2">iota</span><span class="br0">(</span><span class="nu0">1</span><span class="br0">)</span> <span class="sy3">|</span> std<span class="sy4">::</span><span class="me2">views</span><span class="sy4">::</span><span class="me2">take</span><span class="br0">(</span><span class="nu0">9</span><span class="br0">)</span><span class="br0">)</span>
        <a href="../io/cout.html"><span class="kw1758">std::<span class="me2">cout</span></span></a> <span class="sy1">&lt;&lt;</span> i <span class="sy1">&lt;&lt;</span> <span class="st0">' '</span><span class="sy4">;</span>
<span class="br0">}</span></pre></div></div>
<p>输出：
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="text source-text"><pre class="de1">1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9</pre></div></div> 
</div>

<!-- 
NewPP limit report
Preprocessor visited node count: 10556/1000000
Preprocessor generated node count: 12121/1000000
Post‐expand include size: 149256/2097152 bytes
Template argument size: 43697/2097152 bytes
Highest expansion depth: 18/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_zh_:pcache:idhash:12018-0!*!0!!zh!*!zh!* and timestamp 20200310143216 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    来自“<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/iota_view&amp;oldid=65268">https://zh.cppreference.com/mwiki/index.php?title=cpp/ranges/iota_view&amp;oldid=65268</a>”                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer">
                        <div id="cpp-navigation">
            <h5>导航</h5>
            <ul><li><a href="https://zh.cppreference.com/w/cpp/ranges/iota_view">Online version</a></li><li>Offline version retrieved 2020-03-14 18:00.</li></ul></div>
                        <ul id="footer-info">
                                    <li id="footer-info-lastmod"> 本页面最后修改于2020年3月10日 (星期二) 07:32。</li>
                                    <li id="footer-info-viewcount">此页面已被浏览过765次。</li>
                            </ul>
                    </div>
        </div>
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.MathJax","ext.gadget.ColiruCompiler"], null, true);
}</script>
<script src="../../../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 0.130 secs. -->
	</body>
<!-- Cached 20200311181822 -->
</html>